﻿using CoreModule;
using ManagementModule;
using Prism.Ioc;
using Prism.Regions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using UIModule;

namespace IdResourceModule
{
    /// <summary>
    /// 印尼文 资源提供者
    /// </summary>
    public class ResourceProvider : ResourceLocalization.IResourceProvider
    {
            IRegionManager RegionManager { get; set; }
            IContainerProvider ContainerProvider { get; set; }
            IContainerRegistry ContainerRegistry { get; set; }

        public ResourceProvider(
            IRegionManager regionManager,
            IContainerProvider containerProvider, 
            IContainerRegistry containerRegistry)
        {
            RegionManager = regionManager;
            ContainerProvider = containerProvider;

            ContainerRegistry = containerRegistry;

        }
        /// <summary>
        /// 注释 请参考 ZhCnResourceModule.ResourceProvider
        /// </summary>
        public void Use()
        {
          
            //core
            ////ContainerRegistry.RegisterForNavigation<IdResourceModule.Views.ConfigurationHome, CoreModule.ViewModels.ConfigurationHomeViewModel>();
            ////ContainerRegistry.Register<Window, IdResourceModule.Views.ConfigurationHome>(CoreConstant.ConfigurationHomeWindowView);

            // UIModule

            ContainerRegistry.RegisterForNavigation<IdResourceModule.Views.MeasurementHome,UIModule.ViewModels.MeasurementHomeViewModel>(CoreConstant.MeasurementHomeView);
          
            ContainerRegistry.RegisterForNavigation<IdResourceModule.Views.MeasurementResult, UIModule.ViewModels.MeasurementResultViewModel>(UIConstant.MeasurementResultView);


            //ManagementModule
            ContainerRegistry.RegisterForNavigation<IdResourceModule.Views.ManagementHome, ManagementModule.ViewModels.ManagementHomeViewModel>(CoreConstant.ManagementHomeView);

            ContainerRegistry.RegisterForNavigation<IdResourceModule.Views.DataStatistics, IdResourceModule.ViewModels.DataStatisticsViewModel>();

            ContainerRegistry.RegisterForNavigation<IdResourceModule.Views.MeasurementList, IdResourceModule.ViewModels.MeasurementListViewModel>();

            ContainerRegistry.RegisterForNavigation<IdResourceModule.Views.PatientList, IdResourceModule.ViewModels.PatientListViewModel>();

            ///
            ContainerRegistry.RegisterForNavigation<IdResourceModule.Views.PatientStatisticsControl>(ManagementConstant.PatientStatisticsControlView);

            ContainerRegistry.RegisterForNavigation<IdResourceModule.Views.ChartAgeControl>(ManagementConstant.ChartAgeControlView);

            ContainerRegistry.RegisterForNavigation<IdResourceModule.Views.ChartGenderControl>(ManagementConstant.ChartGenderControlView);


            ContainerRegistry.Register<Window, IdResourceModule.Views.AboutWindow>(CoreModule.CoreConstant.AboutWindowView);

            ContainerRegistry.Register<Window, IdResourceModule.Views.CloseWindow>(CoreModule.CoreConstant.CloseWindowView);
            //
 
        }
    }
}
